import skRequest from '../request'

// 获取角色列表
export function postRoleListData(data: any) {
  return skRequest.post({
    url: '/role/list',
    data
  })
}

// 根据id删除角色
export function deleteRoleById(id: number) {
  return skRequest.delete({
    url: `/role/${id}`
  })
}

// 新建角色
export function createRoleData(roleInfo: any) {
  return skRequest.post({
    url: 'http://152.136.185.210:4000/role',
    data: roleInfo
  })
}

// 编辑角色
export function editRoleData(id: number, roleInfo: any) {
  return skRequest.patch({
    url: `/role/${id}`,
    data: roleInfo
  })
}
